package com.zaydanwu.cla.controller.students;

import com.zaydanwu.cla.model.Read;
import com.zaydanwu.cla.model.result.ApiResult;
import com.zaydanwu.cla.service.ReadService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wzo
 * @since 2.0.0 2018-12-18
 */
@RestController
@RequestMapping("/cla/api")
public class ReadController {

    @Resource
    private ReadService readService;

    @RequestMapping("/getAllRead")
    public ApiResult<List<Read>> getAllRead() {
        List<Read> allRead = readService.getAllRead();
        return ApiResult.success(allRead);
    }

}
